﻿using System;
using Asplode.GameEntity.Weapons;
using FlyingGamePC.GameEntity.Weapons;
using Microsoft.Xna.Framework;

namespace Asplode.GameEntity.Characters
{
    public abstract class Character
    {
        // Static members
        public enum Team { NO_TEAM, HUMANS, ZOMBIES };

        // Object members
        public bool isShooting;
        public float rotation;
        public Team team;
        public GameObject gameObject;
        public Weapon weapon;

        public Character(GameObject gameObject)
        {
            this.gameObject = gameObject;
            team = Team.NO_TEAM;
            isShooting = false;
            rotation = 0.0f;

            weapon = new BoxGun();
        }

        public Vector3 rotationVector
        {
            get
            {
                return new Vector3((float)Math.Cos(rotation), 0, -(float)Math.Sin(rotation));
            }
        }

        public void ShootWeapon()
        {
            if (weapon.CanShoot())
            {
                weapon.Shoot(this);
            }
        }
    }
}
